<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="单据作废历史" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link href="/css/Query.css" rel="stylesheet" type="text/css">
<link href="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/css/BillList.css" />
<script src="/js/QueryList.js"></script>
<script src="/js/popup_ext.js"></script>
<script src="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.js"></script>
<script language="javascript">
	function checkDateStr(){
		var startDate=document.getElementById("start_date").value;
		if(startDate==null || startDate==''){
			ShowAlert('提示框','请选择开始日期',200,100);
			return false;
		}else{
			var arr=startDate.split("-");
			if(arr.length==null || arr.length!=3){
				ShowAlert('提示框','开始日期格式不正确',200,100);
				return false;
			}else if(isNaN(arr[0]) || isNaN(arr[1]) || isNaN(arr[2])){
				ShowAlert('提示框','开始日期格式不正确',200,100);
				return false;
			}
		}
		var endDate=document.getElementById("end_date").value;
		if(endDate==null || endDate==''){
			ShowAlert('提示框','请选择结束日期',200,100);
			return false;
		}else{
			var arr=endDate.split("-");
			if(arr.length==null || arr.length!=3){
				ShowAlert('提示框','结束日期格式不正确',200,100);
				return false;
			}else if(isNaN(arr[0]) || isNaN(arr[1]) || isNaN(arr[2])){
				ShowAlert('提示框','结束日期格式不正确',200,100);
				return false;
			}
		}
		return true;
	}
	function createPageParaStr(){
		var str="start_date="+encodeURIComponent(document.getElementById("start_date").value);
		str=str+"&end_date="+encodeURIComponent(document.getElementById("end_date").value);
		str=str+"&type="+document.getElementById("type").value;
		str=str+"&staffer_name="+encodeURIComponent(document.getElementById("staffer_name").value);
		str=str+"&staffer_id="+document.getElementById("staffer_id").value;
		str=str+"&dep_id="+document.getElementById("department").value;
		str=str+"&bill_code="+encodeURIComponent(document.getElementById("bill_code").value);
		str=str+"&mark="+encodeURIComponent(document.getElementById("mark").value);
		str=str+"&ts_id="+document.getElementById("ts_id").value;
		return str;
	}
	
	function createProgramParaStr(){
		var str="start_date="+encodeURIComponent(document.getElementById("hid_start_date").value);
		str=str+"&end_date="+encodeURIComponent(document.getElementById("hid_end_date").value);
		str=str+"&type=${type}";
		str=str+"&staffer_name="+encodeURIComponent(document.getElementById("hid_staffer_name").value);
		str=str+"&staffer_id=${stafferId}";
		str=str+"&dep_id=${depId}";
		str=str+"&bill_code="+encodeURIComponent(document.getElementById("hid_bill_code").value);
		str=str+"&mark="+encodeURIComponent(document.getElementById("hid_mark").value);
		str=str+"&ts_id=${tsId}";
		return str;
	}
	function doSearch(){
		var str;
		if(IsAdvSearch){//高级
			str="search_type=1";
			if(document.getElementById("cb_cre_date").checked){
				if(checkDateStr()){
					str=str+"&cb_cre_date=1";
				}else{
					return;
				}
			}
			if(document.getElementById("cb_type").checked){
				var type=document.getElementById("type").value;
				if(type==null || type==""){
					ShowAlert('提示框','请选择类型',200,100);
					return;
				}
				str=str+"&cb_type=1";
			}
			if(document.getElementById("cb_bill_code").checked){
				var billCode=document.getElementById("bill_code").value.trim();
				if(billCode==null || billCode==""){
					ShowAlert('提示框','请输入单号',200,100);
					return;
				}
				str=str+"&cb_bill_code=1";
			}
			if(document.getElementById("cb_sta").checked){
				var stafferId=document.getElementById("staffer_id").value;
				if(stafferId==null || stafferId=="" || stafferId=="0"){
					ShowAlert('提示框','请选择操作人',200,100);
					return;
				}
				str=str+"&cb_sta=1";
			}
			if(document.getElementById("cb_dep").checked){
				var department=document.getElementById("department").value;
				if(department==null || department=="" || department=="0"){
					ShowAlert('提示框','请选择部门',200,100);
					return;
				}
				str=str+"&cb_dep=1";
			}
			if(document.getElementById("cb_mark").checked){
				var mark=document.getElementById("mark").value.trim();
				if(mark==null || mark==""){
					ShowAlert('提示框','请输入作废原因',200,100);
					return;
				}
				str=str+"&cb_mark=1";
			}
			if(document.getElementById("cb_ts").checked){
				var tsId=document.getElementById("ts_id").value;
				if(tsId==null || tsId=="" || tsId=="0"){
					ShowAlert('提示框','请选择帐套',200,100);
					return;
				}
				str=str+"&cb_ts=1";
			}
		}else{//快速
			str="search_type=2";
			if(!checkDateStr()){
				return;
			}
		}
		var paraStr=createPageParaStr();
		if(paraStr!=""){
			str=str+"&"+paraStr;
		}
		window.location="/system/CancelLogList.ihtm?"+str;
	}
	function doGo(pageIndex){
		var str=getSearchCondition();
		str=str+"&current_page="+pageIndex;
		window.location="/system/CancelLogList.ihtm?"+str;
	}
	function getSearchCondition(){
		var searchType="${searchType}";
		var str="search_type="+searchType;
		if(searchType=="1"){//高级
			<c:if test="${cbCreDate=='1'}">str=str+"&cb_cre_date=1";</c:if>
			<c:if test="${cbType=='1'}">str=str+"&cb_type=1";</c:if>
			<c:if test="${cbSta=='1'}">str=str+"&cb_sta=1";</c:if>
			<c:if test="${cbDep=='1'}">str=str+"&cb_dep=1";</c:if>
			<c:if test="${cbMark=='1'}">str=str+"&cb_mark=1";</c:if>
			<c:if test="${cbBillCode=='1'}">str=str+"&cb_bill_code=1";</c:if>
			<c:if test="${cbTs=='1'}">str=str+"&cb_ts=1";</c:if>
		}else{//快速
			
		}
		var paraStr=createProgramParaStr();
		if(paraStr!=""){
			str=str+"&"+paraStr;
		}
		return str;
	}
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function DoubleClick(it){
		
	}
	
	function doCancel(){
		window.close();
	}
	function doInit(){
		Window_Onload();
	}
	function checkInput(){
		if(window.event.keyCode==13){
			doSearch();
		}
	}
	function doAutoCheck(objId){
		document.getElementById(objId).checked=true;
	}
	function selectStafferName(){
		var url="/base/StafferMainForSelect.ihtm";
		ShowIframe("选择员工",url,800,500,"selectStafferNameCallBack()",900,600);
	}
	function selectStafferNameCallBack(){
		if(popRetVal!=null){
			var arr=popRetVal.split(";");
			document.getElementById("staffer_id").value=arr[0];
			document.getElementById("staffer_name").value=arr[1];
			doAutoCheck("cb_sta");
		}
	}
	function setDate(type){
		var d=new Date();
		var startStr="";
		var endStr="";
		if(type=="CURRENT_MONTH"){
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-01";
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="PREVIEW_MONTH"){
			d=new Date(d.getFullYear(),d.getMonth(),1);
			d.setDate(d.getDate()-1);
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-1";
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="TODAY"){
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="YESTERDAY"){
			d.setDate(d.getDate()-1);
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}
		document.getElementById("start_date").value=startStr;
		document.getElementById("end_date").value=endStr;
		doAutoCheck("cb_cre_date");
	}
	function showDetail(id,type){
		if(type=='BUSINESS_BILL'){
			var strUrl="/business/BusinessBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='RECEIVE_BILL'){
			var strUrl="/finance/ReceiveBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='DELIVER_BILL'){
			var strUrl="/business/DeliverBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='ADJUST_BILL'){
			var strUrl="/finance/AdjustBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='IN_BILL'){
			var strUrl="/storehouse/InBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='OUT_BILL'){
			var strUrl="/storehouse/OutBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='PAY_BILL'){
			var strUrl="/finance/PayBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='COOPER_BILL'){
			var strUrl="/cooper/CooperBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='GATHER_BILL'){
			var strUrl="/cooper/GatherBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='PURCHASE_BUY' || type=='PURCHASE_BACK'){
			var strUrl="/purchase/PurchaseBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='INCOME_BILL'){
			var strUrl="/finance/IncomeBillEdit.ihtm?id="+id;
			showWin(1024,420,strUrl);
		}else if(type=='FEE_BILL'){
			var strUrl="/finance/FeeBillEdit.ihtm?id="+id;
			showWin(1024,420,strUrl);
		}else if(type=='TRANSFER_BILL'){
			var strUrl="/finance/TransferBillEdit.ihtm?id="+id;
			showWin(1024,420,strUrl);
		}else if(type=='LOAN_IN' || type=='LOAN_OUT'){
			var strUrl="/finance/LoanBillEdit.ihtm?id="+id;
			showWin(1024,420,strUrl);
		}else if(type=='OV_BILL'){
			var strUrl="/make/OvBillEdit.ihtm?id="+id;
			showWin(1024,420,strUrl);
		}else if(type=='ALLO_BILL'){
			var strUrl="/storehouse/AlloBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}else if(type=='SETU_BILL'){
			var strUrl="/business/SetuBillEdit.ihtm?id="+id;
			showWin(1024,600,strUrl);
		}
	}
</script>
</head>
<body>
<div class="Wrap"><!-- 页面主框架 -->
    
	<div id="ListContainer" class="Container"><!-- 主体容器 -->
	    
	    <!-- 标题栏 -->
	    <div class="Heading BillIcon">
	        <div class="HeadingContent">
	            <h1>单据作废历史</h1>
	            <span class="Note">查看谁，什么时间作废了单据，单据作废后不可恢复</span>
	        </div>
	    </div>
	
		<!-- 主内容 -->
		<div class="Content">
	        <!-- 筛选控件栏 -->
	        <div class="FilterBar ClearFix">
	            <div class="SearchIcon"></div>
	            <span class="fl">
	            	<table class="MoreOption" cellpadding="0" cellspacing="0">
	            		<th class="c1" width="80px">
	            			<input type="checkbox" name="cb_cre_date" id="cb_cre_date" <c:if test="${cbCreDate=='1' || searchType=='2'}">checked="true"</c:if> style="visibility:hidden;" />
	            			作废日期
	            		</th>
	            		<td width="360px">
	            			<input type="text" class="TextBox Datetime" maxlength="15" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_cre_date');" id="start_date" name="start_date" value="<c:out value="${startDate}" />">
							<input type="hidden" id="hid_start_date" value="<c:out value="${startDate}" />">
							<img src="/images/calendar.gif" class="imgIconButton" onClick="displayCalendar(document.getElementById('start_date'),'yyyy-mm-dd',this,false,'doAutoCheck(\'cb_cre_date\')');">
							至
							<input type="text" class="TextBox Datetime" maxlength="15" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_cre_date');" id="end_date" name="end_date" value="<c:out value="${endDate}" />">
							<input type="hidden" id="hid_end_date" value="<c:out value="${endDate}" />">
							<img src="/images/calendar.gif" class="imgIconButton" onClick="displayCalendar(document.getElementById('end_date'),'yyyy-mm-dd',this,false,'doAutoCheck(\'cb_cre_date\')');">
				            <a href="javascript:setDate('CURRENT_MONTH');">本月</a>
							<a href="javascript:setDate('TODAY');">今天</a>
							<a href="javascript:setDate('YESTERDAY');">昨天</a>
							<a href="javascript:setDate('PREVIEW_MONTH');">上月</a>
	            		</td>
	            	</table>
	            </span>
	            <span class="fr">
	            	<a href="javascript:;" id="lnkMoreOption">更多查询选项</a>
		  			<input type="button" value=" 查 询" onClick="doSearch();" id="sSearchButton" name="sSearchButton" class="buttom search-but">
	            </span>
				<div id="dvMoreOptionBox" class="MoreOptionBox" style="display:none;">
					<table class="MoreOption" cellpadding="0" cellspacing="0">
						<tr>
							<th class="c1" width="80px">
			        			<input type="checkbox" name="cb_type" id="cb_type" <c:if test="${cbType=='1'}">checked="true"</c:if>>
			        			类型
			        		</th>
			        		<td class="c1" width="260px">
			        			<select name="type" id="type" onFocus="doAutoCheck('cb_type');">
					  				<option value="">==请选择==</option>
								    <option value="BUSINESS_BILL" <c:if test="${type=='BUSINESS_BILL'}">selected</c:if>>业务单</option>
								    <option value="DELIVER_BILL" <c:if test="${type=='DELIVER_BILL'}">selected</c:if>>送货单</option>
								    <option value="RECEIVE_BILL" <c:if test="${type=='RECEIVE_BILL'}">selected</c:if>>收款单</option>
								    <option value="ADJUST_BILL" <c:if test="${type=='ADJUST_BILL'}">selected</c:if>>调账单</option>
								    <option value="PAY_BILL" <c:if test="${type=='PAY_BILL'}">selected</c:if>>付款单</option>
								   	<option value="COOPER_BILL" <c:if test="${type=='COOPER_BILL'}">selected</c:if>>外协单</option>
								   	<option value="GATHER_BILL" <c:if test="${type=='GATHER_BILL'}">selected</c:if>>收货单</option>
								   	<option value="PURCHASE_BUY" <c:if test="${type=='PURCHASE_BUY'}">selected</c:if>>采购进货单</option>
								   	<option value="PURCHASE_BACK" <c:if test="${type=='PURCHASE_BACK'}">selected</c:if>>采购退货单</option>
								   	<option value="IN_BILL" <c:if test="${type=='IN_BILL'}">selected</c:if>>入库单</option>
								   	<option value="OUT_BILL" <c:if test="${type=='OUT_BILL'}">selected</c:if>>出库单</option>
								   	<option value="INCOME_BILL" <c:if test="${type=='INCOME_BILL'}">selected</c:if>>其他收入单</option>
								   	<option value="FEE_BILL" <c:if test="${type=='FEE_BILL'}">selected</c:if>>费用单</option>
								   	<option value="TRANSFER_BILL" <c:if test="${type=='TRANSFER_BILL'}">selected</c:if>>转账取款单</option>
								   	<option value="LOAN_IN" <c:if test="${type=='LOAN_IN'}">selected</c:if>>资金借入单</option>
								   	<option value="LOAN_OUT" <c:if test="${type=='LOAN_OUT'}">selected</c:if>>资金借出单</option>
								   	<option value="OV_BILL" <c:if test="${type=='OV_BILL'}">selected</c:if>>产值单</option>
								   	<option value="ALLO_BILL" <c:if test="${type=='ALLO_BILL'}">selected</c:if>>调拨单</option>
								   	<option value="SETU_BILL" <c:if test="${type=='SETU_BILL'}">selected</c:if>>安装单</option>
			  					</select>
			    			</td>
			    			<th class="c2" width="80px">
			        			<input type="checkbox" name="cb_sta" id="cb_sta" <c:if test="${cbSta=='1'}">checked="true"</c:if>>
			        			操作人
			        		</th>
			        		<td class="c3" width="280px">
			        			<input type="text" class="TextBox readonly" readonly="true" maxlength="15" name="staffer_name" id="staffer_name" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_sta');" value="<c:out value="${stafferName}" />">
								<img class="imgIconButton" src="/images/make-a.gif" onClick="selectStafferName();" />
								<input type="hidden" id="hid_staffer_name" value="<c:out value="${stafferName}" />">
								<input type="hidden" id="staffer_id" name="staffer_id" value="${stafferId}">
			    			</td>
			    		</tr>
			    		<tr>
							<th class="c1">
			        			<input type="checkbox" name="cb_bill_code" id="cb_bill_code" <c:if test="${cbBillCode=='1'}">checked="true"</c:if>>
			        			单号
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="bill_code" id="bill_code" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_bill_code');" value="<c:out value="${billCode}" />" >
								<input type="hidden" id="hid_bill_code" value="<c:out value="${billCode}" />">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_dep" id="cb_dep" <c:if test="${cbDep=='1'}">checked="true"</c:if>>
			        			部门
			        		</th>
			        		<td class="c3">
			        			<select name="department" id="department" onFocus="doAutoCheck('cb_dep');">
					  				<option value="0">==请选择==</option>
					  				<commonTag:createSelectTree list="${departmentList}" emptyOption="0" defaultValue="${depId}" />
				  				</select>
			    			</td>
			    		</tr>
			    		<tr>
							<th class="c1">
			        			<input type="checkbox" name="cb_mark" id="cb_mark" <c:if test="${cbMark=='1'}">checked="true"</c:if>>
			        			作废原因
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="mark" id="mark" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_mark');" value="${mark}" >
								<input type="hidden" id="hid_mark" value="<c:out value="${mark}" />">
			    			</td>
			    			<th class="c2">
			    				<input type="checkbox" name="cb_ts" id="cb_ts" <c:if test="${cbTs=='1'}">checked="true"</c:if>>
								账套
			    			</th>
			        		<td class="c3">
			        			<select name="ts_id" id="ts_id" onFocus="doAutoCheck('cb_ts');">
					  				<option value="0">==请选择账套==</option>
					  				<c:forEach var="item" items="${tsList}">
					  				<option value="${item.id}" <c:if test="${tsId==item.id}">selected</c:if>>${item.title}</option>
					  				</c:forEach>
				  				</select>
			        		</td>
			    		</tr>
			    	</table>
			    	
					<div class="OptionOrderBy">
	                    <span class="fr"><a href="javascript:;" id="lnkHiddenOption">隐藏查询选项</a></span>
	                </div>
				</div>
			</div>
			
			<!-- 提示信息显示栏 -->
	        <div class="MsgBar">
	            <%@include file="../inc/AlertMsg.jsp"%>
	        </div>

      	<div class="table-list">
        <table width="100%">
          	<tr>
				<th width="10%">类型</td>
				<th width="14%">单号</td>
				<th width="14%">作废时间</td>
				<th width="10%">操作人</td>
				<th width="10%">账号</td>
				<th width="10%">部门</td>
				<th width="32%">作废原因</th>
          	</tr>
			<c:forEach var="item" items="${qr.list}" varStatus="i">
			<c:if test="${(i.index mod 2)==0}"><c:set var="trClass" value="query_list_data_tr1" /></c:if>
			<c:if test="${(i.index mod 2)!=0}"><c:set var="trClass" value="query_list_data_tr2" /></c:if>
			<tr class="${trClass}" index="${i.index+1}" style='cursor:pointer;' ondblclick='javascript:DoubleClick(this)' onClick='javascript:ClickCheck(this)' onmouseout='javascript:mouseout(this)' onmouseover='javascript:mouseover(this)'>
				<td>
					<input type="radio" name='query_checkbox' value="${item.id}" style="display:none">
					<c:if test="${item.actionCode=='BUSINESS_BILL'}">业务单</c:if>
				  	<c:if test="${item.actionCode=='DELIVER_BILL'}">送货单</c:if>
				  	<c:if test="${item.actionCode=='RECEIVE_BILL'}">收款单</c:if>
				  	<c:if test="${item.actionCode=='ADJUST_BILL'}">调账单</c:if>
				  	<c:if test="${item.actionCode=='PAY_BILL'}">付款单</c:if>
				  	<c:if test="${item.actionCode=='COOPER_BILL'}">外协单</c:if>
				  	<c:if test="${item.actionCode=='GATHER_BILL'}">收货单</c:if>
				  	<c:if test="${item.actionCode=='PURCHASE_BUY'}">采购进货单</c:if>
				  	<c:if test="${item.actionCode=='PURCHASE_BACK'}">采购退货单</c:if>
				  	<c:if test="${item.actionCode=='IN_BILL'}">入库单</c:if>
				  	<c:if test="${item.actionCode=='OUT_BILL'}">出库单</c:if>
				  	<c:if test="${item.actionCode=='INCOME_BILL'}">其他收入单</c:if>
				  	<c:if test="${item.actionCode=='FEE_BILL'}">费用单</c:if>
				  	<c:if test="${item.actionCode=='TRANSFER_BILL'}">转账取款单</c:if>
				  	<c:if test="${item.actionCode=='LOAN_IN'}">资金借入单</c:if>
				  	<c:if test="${item.actionCode=='LOAN_OUT'}">资金借出单</c:if>
				  	<c:if test="${item.actionCode=='OV_BILL'}">产值单</c:if>
				  	<c:if test="${item.actionCode=='ALLO_BILL'}">调拨单</c:if>
				  	<c:if test="${item.actionCode=='SETU_BILL'}">安装单</c:if>
				</td>
				<td ><a href="javascript:showDetail('${item.relId}','${item.actionCode}');">${item.ip}</td>
				<td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm"/></td>
				<td >${item.createrName}</td>
				<td>${item.userName}</td>
				<td>${item.depName}</td>
				<td>${item.cancelReason}</td>
			</tr>
			</c:forEach>
		</table>
			</div>
			
			<!-- 底栏 分页、操作等 -->
	        <div class="BottomToolBar ClearFix">
			    <%@include file="../inc/Pages.jsp"%>
	        </div>
			
		</div>
	</div>
</div>
</body>
</html>
<script type="text/javascript">
	function ChangeWindowSize( container, maxWidth ){
	    setTimeout( function(){
	        var w1 = document.documentElement.clientWidth-40;
	        if( w1>maxWidth ) w1 = maxWidth;
	        else if( w1<870 ) w1 = 860;
	        container.style.width = w1+'px';
	    }, 300 );
	}
	var IsAdvSearch = false;
	(function(){
		doInit();
	    var ListContainer = document.getElementById('ListContainer');
	    ChangeWindowSize( ListContainer, 2020 );    // 超过 1280 的最大 1260 ，不全部铺满
	
	    var lnkMoreOption   = document.getElementById('lnkMoreOption');
	    var lnkHiddenOption = document.getElementById('lnkHiddenOption');
	    lnkMoreOption.onclick = function(){
	    	IsAdvSearch = true;
	        document.getElementById('dvMoreOptionBox').style.display = 'block';
	        document.getElementById('cb_cre_date').style.visibility = 'visible';
	        this.style.visibility = 'hidden';
	    };
	    lnkHiddenOption.onclick = function(){
	    	IsAdvSearch = false;
	        document.getElementById('dvMoreOptionBox').style.display = 'none';
	        document.getElementById('cb_cre_date').style.visibility = 'hidden';
	        lnkMoreOption.style.visibility = 'visible';
	    };
	})();
</script>
